#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

struct compare
{
    bool operator()(vector<int>& v1, vector<int>& v2)
    {
        return v1[0] + v1[1] < v2[0] + v2[1];
    }
};

vector<vector<int>> kSmallestPairs(vector<int>& nums1, vector<int>& nums2, int k) {
    vector<vector<int>> vv;
    for (int i = 0; i < nums1.size(); i++)
    {
        for (int j = 0; j < nums2.size(); j++)
        {
            vector<int> v = { nums1[i],nums2[j] };
            vv.push_back(v);
        }
    }
    sort(vv.begin(), vv.end(), compare());
    if(k<vv.size())
    vv.resize(k);
    return vv;
}

//int main()
//{
//    vector<int> v1 = { 1,7,11 };
//    vector<int> v2 = { 2,4,6 };
//    kSmallestPairs(v1, v2, 3);
//    return 0;
//}

int main()
{
	int a = 1, b = 2, c = 3;
    printf("%d ", a == (b == c));
    printf("%d ", a == (b = c));
    printf("%d ", a = b == c);
	printf("%d\n", a = b = c);
	a = 1, b = 2, c = 3;
	printf("%d %d %d %d ", a = b = c, a = b == c, a == (b = c), a == (b == c));
	return 0;
}